package org.dtrd.modules.dict.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.dict.entity.po.DtrdEntRdDicDistrict;

import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author QR
 * @since 2021-12-06
 */
@Getter
@Setter
@ApiModel(value = "地区数据传输对象")
public class DistrictInfoDTO {

    private Integer dataId;

    @ApiModelProperty("地区名字")
    private String districtInfoDiName;

    private Integer districtInfoDiId;

    private Integer districtInfoParentId;

    @ApiModelProperty("地区id")
    private Integer districtInfoAreaId;

    @ApiModelProperty("省")
    private Integer districtInfoProvinceSn;

    @ApiModelProperty("市")
    private Integer districtInfoCitySn;

    private Date districtInfoCreateTime;


    public DistrictInfoDTO parseFromPo(DtrdEntRdDicDistrict po) {
        dataId = po.getDataId();
        districtInfoDiName = po.getDistrictInfoDiName();
        districtInfoDiId = po.getDistrictInfoDiId();
        districtInfoParentId = po.getDistrictInfoParentId();
        districtInfoAreaId = po.getDistrictInfoAreaId();
        districtInfoProvinceSn = po.getDistrictInfoProvinceSn();
        districtInfoCitySn = po.getDistrictInfoCitySn();
        districtInfoCreateTime = po.getDistrictInfoCreateTime();
        return this;
    }
}
